﻿#include "SortAlgorithm.h"

void TestInsertSort()
{
	int arr[] = { 1, 9, 6, 3, 2, 7, 5, 4, 8 , 0};
	int len = sizeof(arr) / sizeof(arr[0]);
	InsertSort(arr, len);
	PrintArray(arr, len);
}

void TestShellSort()
{
	int arr[] = { 1, 9, 6, 3, 2, 7, 5, 4, 8 , 0 };
	int len = sizeof(arr) / sizeof(arr[0]);
	ShellSort(arr, len);
	PrintArray(arr, len);
}

void TestSelectSort()
{
	int arr[] = { 1, 9, 6, 3, 2, 7, 5, 4, 8 , 0 };
	int len = sizeof(arr) / sizeof(arr[0]);
	SelectSort(arr, len);
	PrintArray(arr, len);
}

void TestHeapSort()
{
	int arr[] = { 1, 9, 6, 3, 2, 7, 5, 4, 8 , 0 };
	int len = sizeof(arr) / sizeof(arr[0]);
	HeapSort(arr, len);
	PrintArray(arr, len);
}

void TestBubbleSort()
{
	int arr[] = { 1, 9, 6, 3, 2, 7, 5, 4, 8 , 0 };
	int len = sizeof(arr) / sizeof(arr[0]);
	BubbleSort(arr, len);
	PrintArray(arr, len);
}

void TestQuickSort()
{
	int arr[] = { 1, 9, 6, 3, 2, 7, 5, 4, 8 , 0 };
	int len = sizeof(arr) / sizeof(arr[0]);
	QuickSort(arr, len);
	PrintArray(arr, len);
}

void TestMergeSort()
{
	int arr[] = { 1, 9, 6, 3, 2, 7, 5, 4, 8 , 0 };
	int len = sizeof(arr) / sizeof(arr[0]);
	MergeSort(arr, len);
	PrintArray(arr, len);
}

void TestCountSort()
{
	int arr[] = { 1, 9, 6, 3, 2, 7, 5, 4, 8 , 0 };
	int len = sizeof(arr) / sizeof(arr[0]);
	CountSort(arr, len);
	PrintArray(arr, len);
}

void TestMergeSortFile()
{
	MergeSortFile("nums.txt");
}

int main()
{
	TestMergeSortFile();
	return 0;
}